using System;
using System.Collections.Generic;
using System.Text;
using System.Text.RegularExpressions;

namespace PHSRAG.Utility
{
    public class Helper
    {
        /// <summary>
        /// Returns the Filesystem supported name by stripping the special characters that are unaccepted.
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        public static string GetFileSystemSupportedName(string input)
        {
            if (!String.IsNullOrEmpty(input))
            {
                string rgPattern = @"[\\\/:\*\?""<>|]";
                Regex oRegex = new Regex(rgPattern);
                return oRegex.Replace(input, "");
            }
            else return string.Empty;
        }
    }
}
